<template>
  <page-header-wrapper :title="false">
    <a-card>
      <a-card>
        <a-row :gutter="30" type="flex" justify="space-between">
          <a-col :span="4">
            <a-card hoverable>
              <a-statistic
                title="案子总数"
                :value="80"
                :value-style="{ color: '#3f8600' }"
              >
              </a-statistic>
            </a-card>
          </a-col>
          <a-col :span="4">
            <a-card hoverable>
              <a-statistic
                title="驳回"
                :value="80"
                :value-style="{ color: '#3f8600' }"
              >
              </a-statistic>
            </a-card>
          </a-col>
          <a-col :span="4">
            <a-card hoverable>
              <a-statistic
                title="授权"
                :value="80"
                :value-style="{ color: '#3f8600' }"
              >
              </a-statistic>
            </a-card>
          </a-col>
          <a-col :span="4">
            <a-card hoverable>
              <a-statistic
                title="审查中"
                :value="80"
                :value-style="{ color: '#3f8600' }"
              >
              </a-statistic>
            </a-card>
          </a-col>
          <a-col :span="4">
            <a-card hoverable>
              <a-statistic
                title="待答复"
                :value="80"
                :value-style="{ color: '#3f8600' }"
              >
              </a-statistic>
            </a-card>
          </a-col>
          <a-col :span="4">
            <a-card hoverable>
              <a-statistic
                title="待补证"
                :value="80"
                :value-style="{ color: '#3f8600' }"
              >
              </a-statistic>
            </a-card>
          </a-col>
        </a-row>
      </a-card>
<!--      <a-card>-->
<!--        <div>-->
<!--          今日新增 <a>{{todayCount}}</a> 条-->
<!--          <a-divider type="vertical" />-->
<!--          剩余 <a>{{totalCount}}</a> 条-->
<!--          <a-divider type="vertical" />-->
<!--          <a-button type="default" style="margin-right:5px" @click="$refs.table.refresh(true)">刷新</a-button>-->
<!--          <a-button type="primary">全部领取</a-button>-->
<!--        </div>-->
<!--        <a-divider />-->
<!--        <div class="table-operator">-->
<!--          <s-table-->
<!--            bordered-->
<!--            size="middle"-->
<!--            ref="table"-->
<!--            :row-key="(record) => record.cb_id"-->
<!--            :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
<!--            :columns="businessColumns"-->
<!--            :data="businessData"-->
<!--          >-->
<!--            <template slot="xu" slot-scope="text,record,index">-->
<!--              {{index + 1}}-->
<!--            </template>-->
<!--            <template slot="action">-->
<!--              <a-button style="margin-right:5px" size="small" type="primary">领取</a-button>-->
<!--              <a-button size="small" type="danger" @click="onTransfer">指派</a-button>-->
<!--            </template>-->
<!--          </s-table>-->
<!--        </div>-->
<!--      </a-card>-->
    </a-card>
<!--    <a-modal-->
<!--      title="指派流程人员"-->
<!--      v-model="processVisible"-->
<!--      :width="300"-->
<!--    >-->
<!--      <a-form-model-item label="流程人员">-->
<!--        <a-select placeholder="请选择要指派的流程人员" style="width:100%">-->
<!--          <a-select-option value="1">马婷婷</a-select-option>-->
<!--          <a-select-option value="2">马云</a-select-option>-->
<!--        </a-select>-->
<!--      </a-form-model-item>-->
<!--    </a-modal>-->
  </page-header-wrapper>
</template>

<script>
  import { STable } from '@/components'
  import patentColumns from '@/columns/patent.process'
  import { getPatentData } from '@/api/dashboard'
  export default {
    components: {
      STable
    },
    name: 'Workplace',
    data () {
      return {
        processVisible: false,
        selectedRowKeys: [],
        businessColumns: patentColumns.modal_business,
        businessData: parameters => {
          return getPatentData(Object.assign(parameters, this.queryParam)).then(res => {
            this.todayCount = res.result.today_unclaimed_count
            this.totalCount = res.result.total_unclaimed_count
            return res.result
          })
        },
        queryParam: {},
        todayCount: '0',
        totalCount: '0'
      }
    },
    methods: {
      onTransfer () {
        this.processVisible = true
      },
      onSelectChange (selectedRowKeys) {
        this.selectedRowKeys = selectedRowKeys
      }
    }
  }
</script>

<style scoped>

</style>
